﻿<%@ Page Title="" Language="C#" MasterPageFile="~/DatHang/MasterPage.master" AutoEventWireup="true"
    CodeFile="DatHang.aspx.cs" Inherits="DatHang_DatHang" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="art-post">
        <div class="art-post-tl">
        </div>
        <div class="art-post-tr">
        </div>
        <div class="art-post-bl">
        </div>
        <div class="art-post-br">
        </div>
        <div class="art-post-tc">
        </div>
        <div class="art-post-bc">
        </div>
        <div class="art-post-cl">
        </div>
        <div class="art-post-cr">
        </div>
        <div class="art-post-cc">
        </div>
        <div class="art-post-body">
            <div class="art-post-inner art-article">
                <h2 class="art-postheader">
                    Đặt hàng</h2>
                <div class="art-postcontent">
                 <asp:Label ID="Result" runat="server" Text="Label" Visible="false"></asp:Label>
                   
                    
                    <table id="ThongTin" runat="server"  class="tt_nn">
                        <thead>
                            <th colspan="2">
                                Nhập thông tin người nhận
                            </th>
                        </thead>
                        <tbody>
                            <tr>
                                <td style="width: 40%; text-align: left; padding-left: 100px;">
                                    Địa chỉ (*):
                                </td>
                                <td>
                                    <asp:TextBox ID="DiaChi" runat="server" Width="250"></asp:TextBox>

                                </td>
                            </tr>
                            <tr>
                                <td style="width: 40%; text-align: left; padding-left: 100px;">
                                    Số điện thoại liên lạc (*):
                                </td>
                                <td>
                                    <asp:TextBox ID="SoDienThoai" runat="server" Width="250"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 40%; text-align: left; padding-left: 100px;">
                                    Email (*):
                                </td>
                                <td>
                                    <asp:TextBox ID="Email" runat="server" Width="250"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" style="text-align: center">
                                    <asp:Button ID="ThanhToan" runat="server" Text="Đặt hàng" CssClass="art-button" OnClick="Button1_Click" />
                                    <asp:Button ID="Nhaplai" runat="server" Text="Nhập lại" CssClass="art-button" />
                                </td>
                            </tr>
                        </tbody>
                    </table>

                    
                    <br />
                    <br />
                    <h2 class="art-postheader">
                        Chi tiết đơn hàng</h2>
                    <asp:ListView ID="ListView1" runat="server" DataKeyNames="IDTaiLieu">
                        <LayoutTemplate>
                            <table id="itemPlaceholderContainer" runat="server" border="1" class="table_view_cart"
                                style="width: 700px; margin-left: 15px !important; margin-bottom: 30px;">
                                <tr id="Tr1" runat="server" style="">
                                    <th id="Th1" runat="server" style="width: 20px !important">
                                        Mã
                                    </th>
                                    <th id="Th2" runat="server">
                                        Tên tài liệu
                                    </th>
                                    <th id="Th6" runat="server">
                                        Số luợng
                                    </th>
                                    <th id="Th4" runat="server">
                                        Đơn giá
                                    </th>
                                    <th id="Th5" runat="server">
                                        Thành tiền
                                    </th>
                                </tr>
                                <tr id="itemPlaceholder" runat="server">
                                </tr>
                                <tr>
                                    <td colspan="4" style="text-align: right; padding-right: 20px; height: 30px;">
                                        Tổng tiền (VNĐ):
                                    </td>
                                    <td style="font-weight: bold">
                                        <%=format_tt(tong_tien.ToString()) %>
                                        <!-- <asp:Label ID="tong_tien" runat="server" Text='<%= DateTime.Now.ToShortDateString() %>'></asp:Label> -->
                                    </td>
                                </tr>
                            </table>
                        </LayoutTemplate>
                        <InsertItemTemplate>
                            <tr style="">
                                <td>
                                    <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    <asp:TextBox ID="TenTLTextBox" runat="server" Text='<%# Bind("TenTL") %>' />
                                </td>
                                <td>
                                    <asp:TextBox ID="DonGiaTextBox" runat="server" Text='<%# Bind("DonGia") %>' />
                                </td>
                            </tr>
                        </InsertItemTemplate>
                        <SelectedItemTemplate>
                            <tr style="background-color: #008A8C; font-weight: bold; color: #FFFFFF;">
                                <td>
                                    <asp:Label ID="IDTaiLieuLabel" runat="server" Text='<%# Eval("IDTaiLieu") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="TenTLLabel" runat="server" Text='<%# Eval("TenTL") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="DonGiaLabel" runat="server" Text='<%# Eval("DonGia") %>' />
                                </td>
                            </tr>
                        </SelectedItemTemplate>
                        <EmptyDataTemplate>
                            <table id="Table1" runat="server" style="background-color: #FFFFFF; border-collapse: collapse;
                                border-color: #999999; border-style: none; border-width: 1px;">
                                <tr>
                                    <td>
                                        No data was returned.
                                    </td>
                                </tr>
                            </table>
                        </EmptyDataTemplate>
                        <EditItemTemplate>
                            <tr style="background-color: #008A8C; color: #FFFFFF;">
                                <td>
                                    <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                                </td>
                                <td>
                                    <asp:Label ID="IDTaiLieuLabel1" runat="server" Text='<%# Eval("IDTaiLieu") %>' />
                                </td>
                                <td>
                                    <asp:TextBox ID="TenTLTextBox" runat="server" Text='<%# Bind("TenTL") %>' />
                                </td>
                                <td>
                                    <asp:TextBox ID="DonGiaTextBox" runat="server" Text='<%# Bind("DonGia") %>' />
                                </td>
                            </tr>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <tr style="">
                                <td style="height: 30px !important;">
                                    <asp:Label ID="IDTaiLieuLabel" runat="server" Text='<%# Eval("IDTaiLieu") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="TenTLLabel" runat="server" Text='<%# Eval("TenTL") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("SoLuong") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="DonGiaLabel" runat="server" Text='<%# format_tt(Eval("DonGia").ToString()) %>' />
                                </td>
                                <td>
                                    <%# format_tt(Eval("ThanhTien").ToString())%>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:ListView>
                   
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringMembership %>"
                        InsertCommand=""></asp:SqlDataSource>
                </div>
                <div class="cleared">
                </div>
            </div>
            <div class="cleared">
            </div>
        </div>
    </div>
</asp:Content>
